import unittest
from test_cases import test_demo1, test_demo2

# 创建一个加载对象
loader1 = unittest.defaultTestLoader.loadTestsFromTestCase(test_demo1.TestDemo1TestCase)
loader2 = unittest.defaultTestLoader.loadTestsFromTestCase(test_demo2.TestDemo2TestCase)

# 创建一个测试套件
suite = unittest.TestSuite()
tests = [loader1, loader2]
suite.addTests(tests)

# 创建执行器,执行测试类
runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite)
